<template>
  <el-card>
    <div class="clearfix" slot="header">
      <h3>
        <i class="el-icon-edit-outline"></i> 下面是您最近的一些操作
      </h3>
    </div>
    <div>
      <el-table :data="tableData" style="width: 100%" stripe border>
        <el-table-column prop="ID" label="编号" width="180"></el-table-column>
        <el-table-column prop="IpAddress" label="IP地址" width="180"></el-table-column>
        <el-table-column prop="AddTime" label="操作时间"></el-table-column>
        <el-table-column prop="LogType" label="操作类型"></el-table-column>
        <el-table-column prop="LogTypeDescription" label="描述"></el-table-column>
      </el-table>
    </div>
  </el-card>
</template>

<script>
import { getLogData } from 'network/home'
export default {
  data() {
    return {
      //表格数据
      tableData: [],
      isActive: '/welcome'
    }
  },
  created() {
    this.getLogs()
  },
  methods: {
    //请求日志信息
    async getLogs() {
      const res = await getLogData()
      if (res.code == 0) {
        this.tableData = res.data
      } else {
        this.$message.error('请求操作日志数据错误！')
      }
    }
  }
}
</script>

<style>
</style>